import 'package:love_newf/app/com/http/http_request.dart';
import 'package:love_newf/app/com/model/room_data_model.dart';
import 'package:love_newf/app/com/model/room_info_model.dart';

class LiveService {
  Future<RoomInfoModel> getRoomInfo(int id, {loadingText = "加载中..."}) async {
    return await HttpRequest().post<RoomInfoModel>(
        "/api/room/getRoom", {"id": id},
        loadingText: loadingText);
  }

  ///房间动态数据，除了第一次进入房间，基本上都是从通知里面获取
  Future<RoomDataModel> getRoomData(int id, {loadingText = "加载中..."}) async {
    return await HttpRequest().post<RoomInfoModel>(
        "/api/room/getRoomData", {id: id},
        loadingText: loadingText);
  }
}
